﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using JsonTest1.Data;
using Newtonsoft.Json.Linq;

namespace JsonTest1.Json
{
    public class ArtistBuilder : JSONBuilder<Artist>
    {
        public override Artist Build(JObject jsonObject)
        {
            Artist data = new Artist();
            data.Id = (int)jsonObject["id"];
            data.Idstr = (string)jsonObject["idstr"];
            data.Image = (string)jsonObject["image"];
            data.Mbgid = (string)jsonObject["mbgid"];
            data.Mbid = (int)jsonObject["mbid"];
            data.Name = (string)jsonObject["name"];
            data.Url = (string)jsonObject["url"];

            return data;
        }
    }
}
